<%@ page import="com.pixiv.Entity.Notice" %><%--
  Created by IntelliJ IDEA.
  User: hasee
  Date: 2021/12/1
  Time: 11:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel = "stylesheet" href = "${pageContext.request.contextPath}/common/layui/css/layui.css">
    <script src = "${pageContext.request.contextPath}/common/jquery3.6.0.js"></script>
    <script src = "${pageContext.request.contextPath}/common/layui/layui.js"></script>
</head>
<body>
<%
    String id = (String) request.getAttribute("Global_Notice_ID");
    //Notice n = NoticeDAO.getNotice(id);
    //System.out.println(n);
    //System.out.println(id);
%>
<div class="layui-main layui-container" style = "width:800px;height:400px;">
    <h2 style = "text-align:center;" id = "caption"></h2>
    <h4 id = "userName"></h4>
    <h3 id = "context"></h3>
</div>

<script type = "text/javascript">

    $.ajax({
        url: "${pageContext.request.contextPath}/back/flushNoticeToShowTitle",
        type: "POST",
        dataType:"json",
        success:function(req){
            if (req.flag == 1)
            {
                var caption = req.caption;
                var context = req.context;
                var username = req.username;
                $("#caption").append(caption);
                $("#context").append(context);
                $("#userName").append("tip:" + username);

            }
        }
    });

</script>
</body>
</html>
